package com.kly.sc.api.application.utils;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;

public class BaseUtils {

    public static Long getSeconds(Integer days) {
        // 获取1天后0点的时间
        DateTime endTimeInOneDays = DateUtil.beginOfDay(DateUtil.offsetDay(DateUtil.date(), days));
        DateTime nowTime = DateUtil.date();
        return DateUtil.between(nowTime, endTimeInOneDays, DateUnit.SECOND, false);
    }



    public static boolean isNullOrZero(Integer num){
        return num == null || num == 0;
    }
}
